<template>
	<div style="text-align: center;margin-top: 200px; height: 80px;" >
		<span style="font-size: 60px; color: #ff6040;">{{username}}</span> <span style="font-size: 30px;">欢迎光临</span>
	</div>
</template>

<script>
export default{
	data(){
		return{
			username:''
		}
	},
	methods:{
		async selectUser(){
			// 动态的从sessionStorage中获取当亲登录的用户编号
		var id = window.sessionStorage.getItem("userid");
		var res = await this.$http.get("selectById?id=" + id);
		this.username = res.data.data.username;
		}
	},
	mounted() {
		this.selectUser()
	}
}
</script>

<style scoped>
</style>
